package ControlLayer;
import ModelLayer.*;
import java.util.ArrayList;


/**
 * Write a description of class SaleCtrl here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class SaleCtrl
{
    // instance variables - replace the example below with your own
    private static SaleContainer saleCont = new SaleContainer();
    private static CustomerCtrl customerCtrl = new CustomerCtrl();
    private static ItemCtrl itemCtrl = new ItemCtrl();

    /**
     * Constructor for objects of class SaleCtrl
     */
    public SaleCtrl()
    {
        // initialise instance variables
    }
    
    public SellItem getSellItem(long _id)
    {
        return itemCtrl.getSellItem(_id);
    }
    
    public Customer getCustomer(long _id)
    {
        return customerCtrl.getCustomer(_id);
    }

    public Sale getSale(long _id)
    {
        return saleCont.getSale(_id);
    }
    
    public void createSale(Sale _sale)
    {
        saleCont.createSale(_sale);
    }
    
    public void updateSale(Sale _sale)
    {
       saleCont.updateSale(_sale);
    }
    
    public void removeSale(long _id)
    {
        saleCont.removeSale(_id);
    }
    
    public ArrayList<Sale> listAllSales()
    {
        return saleCont.listAllSales();
    }
}
